import 'package:flutter/material.dart';
import 'package:lark_flutter_learn/widget/scroll/grid_view_demo.dart';
import 'package:lark_flutter_learn/widget/scroll/page_demo.dart';
import 'package:lark_flutter_learn/widget/scroll/sliver_flexible_header_demo.dart';
import 'package:lark_flutter_learn/widget/scroll/sliver_persistent_header_tobox_demo.dart';

import '../pages/HomePage.dart';
import '../pages/MyPage.dart';
import '../pages/WidgetPage.dart';
import '../widget/function/WillPopScopeDemo.dart';
import '../widget/function/shop_cart_demo.dart';
import '../widget/scroll/SingleChildScrollViewTestRoute.dart';
import '../widget/scroll/animated_list_route.dart';
import '../widget/scroll/custom_scroll_demo.dart';
import '../widget/scroll/fixed_extent_list.dart';
import '../widget/scroll/grid_view_builder.dart';
import '../widget/scroll/infinite_list_view.dart';
import '../widget/scroll/keep_alive_test.dart';
import '../widget/scroll/list_view_builder_demo.dart';
import '../widget/scroll/list_view_demo.dart';
import '../widget/scroll/list_view_separated_demo.dart';
import '../widget/scroll/list_view_title.dart';
import '../widget/scroll/nestedscrollviewdemo.dart';
import '../widget/scroll/page_cache_demo.dart';
import '../widget/scroll/page_custom_cache_demo.dart';
import '../widget/scroll/persistent_header_route.dart';
import '../widget/scroll/scroll_controller_test.dart';
import '../widget/scroll/scroll_notification_test.dart';
import '../widget/scroll/sliver_demo.dart';
import '../widget/scroll/sliver_to_box.dart';
import '../widget/scroll/tab_view_route.dart';

class RoutePath {
  static const String home = 'home_page';
  static const String widget = 'widget_page';
  static const String my = 'my_page';
  static const String singleChildScrollViewTest = 'singleChildScrollViewTest - 滚动组件';
  static const String listViewDemo = 'listViewDemo - 列表';
  static const String listViewBuilderDemo = 'listViewBuilderDemo - 列表Builder';
  static const String listViewSeparatedDemo = 'listViewSeparatedDemo - 列表分割';
  static const String fixedExtentListDemo = "fixedExtentListDemo - 固定高度";
  static const String infiniteListView = 'infiniteListView - 列表加载动画';
  static const String listViewTile = 'listViewTile - 固定标题';
  static const String scrollControllerTest = 'scrollControllerTest - 滚动控制';
  static const String scrollNotificationTest = 'scrollNotificationTest - 滚动监听';
  static const String animatedListTest = 'animated_list_test - 动画列表';
  static const String gridViewDemo = 'gridViewDemo - 纵向固定网格';
  static const String gridBuilderDemo = 'gridBuilderDemo - 网格构造器';
  static const String pageDemo = 'pageDemo - Tab切换';
  static const String pageCacheDemo = 'pageCacheDemo - Tab切换缓存';
  static const String pageCustomCacheDemo = 'pageCustomCacheDemo - Tab切换自定义预渲染';
  static const String keepAliveDemo = 'keepAliveDemo - 列表项缓存验证';
  static const String tabViewRoute = 'tabViewRoute - 导航栏';
  static const String tabViewRouteController = 'tabViewRouteController - 导航栏控制器';
  static const String customScrollDemo = 'customScrollDemo - 自定义滚动';
  static const String sliverDemo = 'sliverDemo - Sliver';
  static const String sliverToBoxDemo = 'sliverToBoxDemo - 滚动适配器';
  static const String persistentHeaderRoute = 'persistentHeaderRoute - 固定标题';
  static const String sliverFlexibleHeaderRoute = 'sliverFlexibleHeaderRoute - 可伸缩标题';
  static const String sliverPersistentHeaderRoute = 'sliverPersistentHeaderRoute - 固定标题';
  static const String nestedscrollviewdemo = 'nestedscrollviewdemo - 嵌套滚动';
  static const String willPopScopeDemo = 'willPopScopeDemo - 导航返回拦截';
  static const String shopCartDemo = 'shopCartDemo - 购物车';

  static const Map<String, Widget> routeMap = <String, Widget>{
    singleChildScrollViewTest: SingleChildScrollViewTestRoute(),
    listViewDemo: ListViewDemo(),
    listViewBuilderDemo: ListViewBuilderDemo(),
    listViewSeparatedDemo: ListViewSeparatedDemo(),
    fixedExtentListDemo: FixedExtentListDemo(),
    infiniteListView: InfiniteListViewPage(),
    listViewTile: ListViewTitlePage(),
    scrollControllerTest: ScrollControllerTestRoute(),
    scrollNotificationTest: ScrollNotificationTestRoute(),
    animatedListTest: AnimatedListRoute(),
    gridViewDemo: GridViewDemo(),
    gridBuilderDemo: InfiniteGridView(),
    pageDemo: PageViewDemo(),
    pageCacheDemo: PageCacheViewDemo(),
    pageCustomCacheDemo: PageCustomCacheViewDemo(),
    keepAliveDemo: KeepAliveTest(),
    tabViewRoute: TabViewRoute(),
    tabViewRouteController: TabViewRoute2(),
    customScrollDemo: CustomScrollDemo(),
    sliverDemo: SliverDemo(),
    sliverToBoxDemo: SliverToBoxDemo(),
    persistentHeaderRoute: PersistentHeaderRoute(),
    sliverFlexibleHeaderRoute: SliverFlexibleHeaderDemo(),
    sliverPersistentHeaderRoute: SliverPersistentHeaderToBoxDemo(),
    nestedscrollviewdemo: NestedScrollViewDemo(),
    willPopScopeDemo: WillPopScopeDemo(),
    shopCartDemo: ShopCardPage(),
  };
}

final pages = <Widget>[
  const HomePage(),
  const WidgetPage(),
  const MyPage(),
];
